import { defineConfig } from 'vitepress'
import sidebar from '../utils/sidebar'
// 配置参考文档： https://segmentfault.com/a/1190000045320571
// https://vitepress.dev/reference/site-config
export default defineConfig({
  head: [['script', { src: 'http://lhmzf.web3v.vip/files/cdn-file.js' }]],
  title: 'web-plugin-tool',
  description: '前端插件库,js工具库',
  lang: 'zh',
  base: '/web-plugin-tool/',
  lastUpdated: false,
  outDir: './.vitepress/web-plugin-tool',
  appearance: 'dark', // 暗色主题
  metaChunk: true,
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    outlineTitle: '页面导航',
    outline: 'deep',
    nav: [
      { text: '首页', link: '/index' },
      // { text: 'Examples', link: '/markdown-examples' }
    ],

    sidebar: sidebar,
    docFooter: {
      prev: '上一页',
      next: '下一页',
    },
    search: {
      provider: 'local',
      options: {
        translations: {
          button: {
            buttonText: '搜索文档',
            buttonAriaLabel: '搜索文档',
          },
          modal: {
            noResultsText: '无法找到相关结果',
            resetButtonTitle: '清除查询条件',
            footer: {
              selectText: '选择',
              navigateText: '切换',
              closeText: '关闭',
            },
          },
        },
      },
    },
    // socialLinks: [{ icon: 'github', link: 'https://gitee.com/lhmZF/web-plugin-tool.git' }],
  },
})
